From cdd36410fd3cb31b7876a96a52d198a81a9c9ec8 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Tue, 27 May 2025 10:05:44 +0200 Subject: [PATCH] luci-proto-modemmanager: fix when to show username and password Signed-off-by: Florian Eckert --- .../resources/protocol/modemmanager.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/protocols/luci-proto-modemmanager/htdocs/luci-static/resources/protocol/modemmanager.js b/protocols/luci-proto-modemmanager/htdocs/luci-static/resources/protocol/modemmanager.js index 6db25631b4..b7b0b98dba 100644 --- a/protocols/luci-proto-modemmanager/htdocs/luci-static/resources/protocol/modemmanager.js +++ b/protocols/luci-proto-modemmanager/htdocs/luci-static/resources/protocol/modemmanager.js @@ -125,14 +125,18 @@ return network.registerProtocol('modemmanager', { o.depends('allowedmode','5g|4g|3g|2g'); o = s.taboption('general', form.Value, 'username', _('PAP/CHAP username')); - o.depends('auth', 'pap'); - o.depends('auth', 'chap'); - o.depends('auth', 'both'); + o.depends({'allowedauth': 'pap', '!contains': true }); + o.depends({'allowedauth': 'chap', '!contains': true }); + o.depends({'allowedauth': 'mschap', '!contains': true }); + o.depends({'allowedauth': 'mschapv2', '!contains': true }); + o.depends({'allowedauth': 'eap', '!contains': true }); o = s.taboption('general', form.Value, 'password', _('PAP/CHAP password')); - o.depends('auth', 'pap'); - o.depends('auth', 'chap'); - o.depends('auth', 'both'); + o.depends({'allowedauth': 'pap', '!contains': true }); + o.depends({'allowedauth': 'chap', '!contains': true }); + o.depends({'allowedauth': 'mschap', '!contains': true }); + o.depends({'allowedauth': 'mschapv2', '!contains': true }); + o.depends({'allowedauth': 'eap', '!contains': true }); o.password = true; o = s.taboption('general', form.ListValue, 'iptype', _('IP Type')); -- 2.30.2